# coding=utf-8
# # from django.contrib.auth import authenticate, login, logout
# # from django.contrib.auth.decorators import permission_required, login_required
# from django.contrib.auth.mixins import LoginRequiredMixin
# # from django.http import *
# # from django.shortcuts import render
# # from django.template.context_processors import csrf
# from django.template.defaulttags import csrf_token
# from django.utils.decorators import method_decorator
# from django.views.decorators.cache import cache_page
#
# from Apps.Auth.auth import login_required_ex
# # from Apps.Auth.models import AccountModel
# from gbconf import GBConfig
# import GameBar
# from GameBar import utils
# # from GameBar.handler import WebRequestHandler, register_url_handler, BaseHandler
# # from GameBar.urls import urlpatterns
# # from Apps.LN_game.err import *
# from Apps.LN_game.forms import ProductForm, GameProgressForm
# from Apps.LN_game.models import ProductModel as mProduct
# from Apps.LN_game.models import GameProgressModel as mGameProgress
from django.http import JsonResponse


# def handler404(request):
#     return HttpResponseRedirect("http://www.baidu.com")


# Create your views here.
def json_resp(err, data=None):
    return JsonResponse({"status": err.errcode, "message": err.message, "object": data})


# menu_list = (
#     ["角色管理", "/LN_game/role/?", 0],
#     ["产品管理", "/LN_game/product/page/query/", 0],
# )

# html_data = {
#     "menu_list": menu_list,
#     "resource_url": "",
#     "edit_product_page_url": "/LN_game/product/page/edit/",
#     "query_product_page_url": "/LN_game/product/page/query/",
#     "add_product_page_url": "/LN_game/product/page/add/",
#     "query_product_api_url": "/LN_game/product/api/query/",
#     "add_product_api_url": "/LN_game/product/api/add/",
#     "update_product_api_url": "/LN_game/product/api/update/",
#     "delete_product_api_url": "/LN_game/product/api/delete/",
# }
#
#
# def set_menu_list(method):
#     def proc(request, *args, **kwargs):
#         if request.session.has_key("menu_id"):
#             id = int(request.session.get('menu_id'))
#             for m in menu_list:
#                 m[2] = 0
#             menu_list[id][2] = 1
#
#         return method(request, *args, **kwargs)
#
#     return proc


# class AccountManager(BaseHandler):
    # class Activities(object):



# class ProductManager(object):
#     class Activities(object):
#
#
#     class API(object):

